package dao

import (
	"go.uber.org/zap"
	"order_srv/model"
	"order_srv/order"
	"smart-health-platforms/pkg"
)

func OrderReturn(in *order.OrderReturnRequest) (*model.Order, error) {
	//根据订单号获取订单
	orders := model.Order{
		OrderSn: in.OrderSn,
	}
	err := orders.GetByOrderOrderNo() //根据订单号获取订单
	if err != nil {
		pkg.Error("订单不存在", zap.Error(err))
		return nil, err
	}
	return &orders, err

}
